The Next Generation Network (NGN) gradually develops from the circuit switching that is mainly adopted in the traditional Public Switched Telephone Network (PSTN) to the packet switching. The NGN is a fusion of the original PSTN and Internet Protocol Data Network (IPDN), which converges voices and data to the identical seamless network using a distributed architecture, thereby not only reducing the burthen of the PSTN, but also increasing and enhancing many old and new services through the new characteristics of the IP technology.
The NGN is mainly composed of a soft switch device, a media gateway, a signaling gateway, a terminal device and an integrated access device. The soft switch device provides the NGN with functions of call control and connection control of the services requiring instantaneity, and is the calling and controlling core of the NGN. The media gateway usually includes an access module, a switch module, a media resource module and a master module. In which, the access module may be classified into a relay access module connected to the PSTN or the Private Branch eXchange (PBX) and a user access module connected to the user's Foreign eXchange Station (FXS). In which, depending on whether the access module includes the user access module, the media gateway may be classified into a relay media gateway and an access media gateway. FIG. 1A is a schematic diagram of the working principle of a media gateway in the prior art, and FIG. 1B is a schematic diagram of the working principle of another media gateway in the prior art. With reference to FIGS. 1A and 1B, the working principle of the media gateway in the prior art includes:    1) in the direction from the circuit domain (including the user connected to the PSTN, the PBX and the FXS) to the IP network: the access module receives the Time Division Multiplexing (TDM) data from the circuit domain, and switches to the media resource module through a Time Slot Interchange (TSI) circuit in the switch module; a media processing unit of the media resource module receives the TDM data, performs a code format conversion of the TDM data, encapsulates the TDM data as an IP message that usually may be a Real-time Transport Protocol (RTP) message or a Real-time Transport Control Protocol (RTCP) message, and forwards to the IP network through the packet interface in the media resource module connected to the IP network.    2) in the direction from the IP network to the circuit domain: the packet interface in the media resource module receives the IP message, which is usually an RTP message or an RTCP message, and transmits the IP message to the media processing unit of the media resource module; the media processing unit processes the IP message and converts it into TDM data in the circuit domain through de-encapsulation and code format conversion, and then switches the TDM data to the access module through the TSI of the switch module; and the access module transmits the TDM data to the circuit domain network through an interface.
Herein, the master module of the media gateway is mainly responsible for managing the switch module, the access module and the media resource module. Specifically, the master module performs a Layer 2 (L2) switch through an LAN Switch (LSW) in the switch module, and transmits a management message to respective modules for a management thereof. In addition, when needing to be processed between different media resource modules, the IP message may also undergo an L2 switch through the LSW, so as to be forwarded between different media resource modules.
During the implementation of the present invention, the inventor finds that the prior art at least has the following problem: in the existing media gateway, each media resource module at least requires one packet interface to be connected to the IP network; the number of the external interfaces is large, and especially when a highly reliable interface binding manner (i.e., binding two packet interfaces) is adopted, the number of the external interfaces will be doubled, which requires a large amount of maintenance of the external interfaces and causes great inconveniences. In addition, since a large number of packet interfaces are directly exposed to the IP network, the media gateway is easy to be attacked, and the reliability of the whole media gateway is threatened.